package mysql

import "gorm.io/gorm"

type Shop struct {
	gorm.Model
	Name    string  `gorm:"type:varchar(30);comment:商品名称"`
	Price   float64 `gorm:"type:decimal(10,2);comment:商品价格"`
	Img     string  `gorm:"type:varchar(30);comment:商品图片"`
	ClassId int     `gorm:"type:int(30);comment:分类id"`
	BrandId int     `gorm:"type:int(30);comment:品牌id"`
}
type Class struct {
	gorm.Model
	Name string `gorm:"type:varchar(30);comment:分类名称"`
}
type Brand struct {
	gorm.Model
	Name string `gorm:"type:varchar(30);comment:品牌名称"`
}
type ShopClassBrand struct {
	Shop
	ClassName string `gorm:"type:varchar(30);comment:分类名称"`
	BrandName string `gorm:"type:varchar(30);comment:品牌名称"`
}
